num1=input("请输入4位会员卡号：")
num2=int(num1)

gewei=num2%10
shiwei=num2//10%10
baiwei=num2//100%10
qianwei=num2//1000

num3=qianwei+baiwei+shiwei+gewei




print()
print("会员卡号是：",num1)
print("千位数：",qianwei,",百位数：",baiwei,",十位数",shiwei,",个位数",gewei)
print("会员卡号",num1,"各位之和：",num3)
print("会员卡号",num1,"的会员，")
if num3>20:
    print("会员卡号",num1 , "的会员,您中奖了!奖品是MP3!")
if num3<20:
    print("会员卡号",num1 , "的会员,很遗憾，您没有中奖，下次再接再厉哦！")